<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title> 文章列表</title>
    <link rel="stylesheet" href="${base}/res/manage/css/common.css">
    <link rel="stylesheet" href="${base}/res/manage/css/ec.css">
    <link rel="stylesheet" href="${base}/res/manage/css/list.css">
    <script type="text/javascript" src="${base}/res/plugin/jquery/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="${base}/res/plugin/validator/jquery.validate.min.js"></script>
    <script type="text/javascript" src="${base}/res/admin/js/common.js"></script>
    <script type="text/javascript" src="${base}/res/admin/js/list.js"></script>
    <script type="text/javascript" src="${base}/res/admin/js/scrollView.js"></script>
    <script type="text/javascript" src="${base}/res/admin/js/initWidth.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
        [@flash_message /]
        });
    </script>
</head>
<body>
<div class="tab set">
    <h3>[#--<a href="javascript:;">首页</a>--]<a href="javascript:;">微信管理</a><a href="javascript:;">> 文章管理</a></h3>
    <form id="listForm" action="list.jhtml" method="get">
        <div class="txte">
            <p class="txtl"><a href="${base}/admin/wxArticle/add.jhtml" class="ared "> + 添加文章</a></p>
            <p class="txtp">
                <input type="text" name="title" id="title" value="${title}" placeholder="文章标题" class="txt">
                <input type="submit" value="搜索" class="txt red">
            </p>
        </div>
        <div class="tablist">
            <table cellpadding="0" cellspacing="0" class="scrollTable">
                <tr>
                    <th>文章标题</th>
                    <th>内容模版</th>
                    <th>是否为外部链接</th>
                    <th>外部URL</th>
                    <th>是否置顶</th>
                    <th>是否发布</th>
                    <th>阅读次数</th>
                    <th>点赞次数</th>
                    <th>创建时间</th>
                    <th class="icon">操作</th>
                </tr>
            [#list page.list as article]
                <tr>
                    <td>
                    ${article.title}
                    </td>
                    <td class="center">
                    ${article.contentTemp}
                    </td>
                    <td class="center">
                    ${article.isOutUrl?string("是","否")}
                    </td>
                    <td class="center">
                        <span class="text-hidden">
                        ${article.outLink}
                        </span>
                    </td>
                    <td class="center">
                    ${article.isTop?string("置顶","不置顶")}
                    </td>
                    <td class="center">
                    ${article.isPublish?string("发布","未发布")}
                    </td>
                    <td class="center">
                    ${article.readCnt}
                    </td>
                    <td class="center">
                    ${article.hitCnt}
                    </td>
                    <td class="center">
                        <span title="${article.createDate?string("yyyy-MM-dd")}">${article.createDate?string("yyyy-MM-dd")}</span>
                    </td>
                    <td class="icon">
                        <div>
                            [#if article.isPublish]
                                <a href="${base}/admin/wxArticle/isPublish.jhtml?id=${article.id}&isPublish=false">取消发布</a>
                            [#else ]
                                <a href="${base}/admin/wxArticle/isPublish.jhtml?id=${article.id}&isPublish=true">发布</a>
                            [/#if]
                            <a class="delete" title="删除" type="delOne" idName="id" idVal="${article.id}"
                               href="javascript:void(0)"></a>
                            <a class="edit" title="编辑" href="edit.jhtml?id=${article.id}"></a>
                        </div>
                    </td>
                </tr>
            [/#list]
            </table>
        [@pagination pageNumber = page.pageNumber totalPages = page.pages]
            [#include "/admin/include/pagination.ftl"]
        [/@pagination]
        </div>
    </form>
</div>
</body>
</html>